//var menuTree;
var prefix = basepath + "/allinpayProduction"

var menuIds;
var enterpriseList;
var compPreviligeList;
var allinpayPreviligeList;
$(function() {
	showFixTerm()
//	getMenuTreeData();
//	validateRule();
});
$.validator.setDefaults({
	submitHandler : function() {
//		getAllSelectNodes();
//		save();
	}
});

function showFixTerm() {
	$("div#freeTermDiv").hide()
	$("div#termDiv").show()
	$("div#fixTermDiv").show()
}
function showFreeTerm() {
	$("div#termDiv").hide()
	$("div#fixTermDiv").hide()
	$("div#freeTermDiv").show()
	
}


function addFinancialProd() {
	$('#menuIds').val(menuIds);
	var role = $('#signupForm').serialize();
	alert('readty post to addFinancialProd:' + JSON.stringify(role))
	$.ajax({
		cache : true,
		type : "POST",
		url : prefix + "/addFinancialProd",
		data : role, // 你的formid

		async : false,
		error : function(request) {
			alert("Connection error");
		},
		success : function(data) {
			if (data.code == 0) {
				parent.layer.msg("操作成功");
//				sleep(3000);
//				parent.reload();
				var index = parent.layer.getFrameIndex(window.name);
				parent.layer.close(index);

			} else {
				parent.layer.msg(data.msg);
			}
		}
	});
}



